#ifndef INC_PATTERNNODE
#define INC_PATTERNNODE

#include "board.h"
#include <iostream>
#include <fstream>


class patternNode
{
	public:
			patternNode();
			patternNode(double eval);
			~patternNode();
			void developTree(int devLimit, patternNode* memSibling);
			void setSameColor(patternNode newNode);
			void setEmpty(patternNode newNode);
			void setSibling(patternNode newNode);
			void setDiffColor(patternNode newNode);
			void setLine(int lineNumber);
			int getLine();
			patternNode* getSameColor();
			patternNode* getEmpty();
			patternNode* getDiffColor();
			patternNode* getSibling();
			double getEvalValue();
			void setEvalValue(double newValue);
			void saveTreeValues();
			double patternValueIdentification(int line);
			void chainTrees(int linesNumber);
			double findEvalFromTree(patternNode * rootTrees,int posx, int posy, bool color);
			void setBoard(Board* newBoard);
			Board* getBoard();
			void chooseBranch(int posx, int posy, patternNode * result, int vect[], int length);
	private:
			patternNode* sameColor;
			patternNode* diffColor;
			patternNode* empty;
			patternNode* sibling;
			int victory;
			int visits;
			int line;
			double evalValue;
			Board* board;
};

#endif